<template>
  <!-- <div id="app"> -->
  <!-- <transition appear name="fade-transform" mode="out-in">
    <router-view />
  </transition> -->
  <router-view v-slot="{ Component }">
    <transition appear name="fade" mode="out-in">
      <keep-alive>
        <component :is="Component" />
      </keep-alive>
    </transition>
  </router-view>
  <!-- </div> -->
</template>

<script>
export default {
  data() {
    return {
      name: 'app'
    }
  },
  created() {
    if (document.getElementById('Loading')) document.getElementById('Loading').remove();
    console.log("移除")
  }
}
</script>
<style>
.fade-enter-from,
.fade-leave-to {
  /*定义进入开始和离开结束的透明度为0*/
  opacity: 0;
}

.fade-leave-to {
  transform: translateX(20px);
}

.fade-enter-to {
  transform: translateX(-20px);
}

.fade-enter-to,
.fade-leave-from {
  /*定义进入结束和离开开始的透明度为1*/
  opacity: 1;
}

.fade-leave-active,
.fade-enter-active {
  transition: all 0.5s ease-out;
}

/* .fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.5s;
}

.fade-transform-enter-from {
  opacity: 0;
  transform: translateX(-30px);
}

.fade-transform-leave-to {
  opacity: 0;
  transform: translateX(30px);
} */
</style>
